<?php
require_once ("../../config/config.php");
require_once ("../../config/constants.php");
require_once ("../../db/queries.php");
require_once ("../../common/common.php");

$username = $_REQUEST["username"];
$password = $_REQUEST["password"];
$firstname = $_REQUEST["firstname"];
$lastname = $_REQUEST["lastname"];
$email = $_REQUEST["email"];
$sex = $_REQUEST["sex"];

function registerUser($username, $password, $firstname, $lastname, $email, $sex) {
	$strQuery = "insert into cc_v1.`users` (uname,pword,fname,lname,email,sex,skin,score) values('".$username."','".$password."','".$firstname."','".$lastname."','".$email."',".$sex.",'',0)";
	
	return generateResultSet($strQuery);
}
makeUpdateXML(registerUser($username, $password, $firstname, $lastname, $email, $sex));
?>